<?php
/* [DoYouHaoBaby!] (C)Dianniu From 2010.
   this($)*/

!defined('DYHB_PATH') && exit;

class TemplateGtkGladeWidgetCompiler_GtkProgressBar extends TemplateGtkGladeWidgetCompilerBase{

	protected function compileCreateWidget_(TemplateGtkGladeWidget $oObject){
		$sWidgetClass=$oObject->getWidgetClass();
		$sVariableName='$'.TemplateGtkGlade::getWidgetVariableName($oObject);
		$sCompiled="\t\t{$sVariableName}=new {$sWidgetClass}();";
		$this->setStringInt_($oObject,$sCompiled,'fraction',false);// 完成
		$this->setStringInt_($oObject,$sCompiled,'pulse_step',false);// 脉冲
		$this->setStringInt_($oObject,$sCompiled,'orientation',false);// 方向
		$this->setStringInt_($oObject,$sCompiled,'text');// 文字
		$this->setStringInt_($oObject,$sCompiled,'ellipsize',false);// 省略化
		$this->setStringInt_($oObject,$sCompiled,'discrete_blocks',false);// 间断区块
		$this->setBool_($oObject,$sCompiled,'activity_mode');// 活动模式
		$this->setBool_($oObject,$sCompiled,'show_text');// 显示文字
		if(($sTextAlignX=$oObject->getProperty('text_xalign'))!==null){$sCompiled.= "\t\t{$sVariableName}->set_property('text-xalign',{$sTextAlignX});";}// 文字位置
		if(($sTextAlignY=$oObject->getProperty('text_yalign'))!==null){$sCompiled.= "\t\t{$sVariableName}->set_property('text-yalign',{$sTextAlignY});";}
		return $sCompiled;
	}

	protected function compileChildWidgetPacking_(TemplateGtkGladeWidget $oParentWidget,TemplateGtkGladeWidget $oChildWidget,TemplateGtkGladeWidgetPacking $oPacking){}

	static public function regToProcessorManager(ITemplateObjProcessorManager $oManager){
		$oManager->regProcessor(str_replace('TemplateGtkGladeWidgetCompiler_','',__CLASS__),__CLASS__);
	}

}
